﻿using System;
using System.Collections.Generic;

using WebDavProcessor.Enumerations;
using WebDavProcessor.Resources;

namespace WebDavProcessor.Interfaces
{
    public interface IWebDavPropertyProvider : IWebDavResourceProvider
    {
        /// <summary>
        /// ONLY DEAD PROPERTIES!!! DEAD PROPERTIES INCLUDE CREATION DATE, CONTENT TYPE, ETC.!!!
        /// </summary>
        /// <param name="resourcePath"></param>
        /// <param name="depth">FOR COLLECTIONS ONLY!!! 0 - FOR GIVEN COLLECTION, 1 - FOR COLLECTION AND DESCENDANTS, INFINITY - FOR COLLECTION AND RECURSIVELY FOR DESCENDANTS!!!</param>
        /// <returns>WebDavResource for stream resources, WebDavResourceCollection for collections.</returns>
        WebDavResource GetAllProperties(string resourcePath, WebDavDepth depth);
        /// <summary>
        /// DEAD PROPERTIES AND LIVE PROPERTIES!!! LIVE PROPERTIES ARE MANAGED BY THE SERVER FOR SOME PURPOSES!!!
        /// </summary>
        /// <param name="resourcePath"></param>
        /// <param name="includedNames"></param>
        /// <param name="depth"></param>
        /// <returns></returns>
        WebDavResource GetAllProperties(string resourcePath, List<string> includedNames, WebDavDepth depth);
        WebDavResource GetProperties(string resourcePath, List<string> propertyNames, WebDavDepth depth);
        WebDavResource GetPropertyNames(string resourcePath, WebDavDepth depth);
        /// <summary>
        /// ATOMIC!!!
        /// </summary>
        /// <param name="resourcePath"></param>
        /// <param name="setProperties"></param>
        /// <param name="removedProperties"></param>
        /// <returns></returns>
        WebDavResource UpdateProperties(string resourcePath, List<WebDavProperty> setProperties, List<string> removedProperties);
    }
}
